

			
			function drawPath() {
				initializeDestinationLatLng();
				var request = {
					origin:start,
					destination:end,
					travelMode: google.maps.TravelMode.WALKING
				};
				directionsService.route(request, function(response, status) {
					if (status == google.maps.DirectionsStatus.OK) {
						directionsDisplay.setDirections(response);
						showSteps(response);
					}
				});
			}
			
			function initializeDestinationLatLng() {
				var x = document.getElementById("ligneSelect").selectedIndex;
				var destinationName = document.getElementsByTagName("option")[x].value;
				end = tableauLatLng[destinationName] ;
				alert(destinationName);
				alert(end.lat()+", "+end.lng());
			}
			
			function showSteps(directionResult) {
				var myRoute = directionResult.routes[0].legs[0];
				for (var i = 0; i < myRoute.steps.length; i++) {
					var marker = new google.maps.Marker({
						position: myRoute.steps[i].start_location,
						map: map
					});
					attachInstructionText(marker, myRoute.steps[i].instructions);
					markerArray[i] = marker;
				}
			}
			
			function attachInstructionText(marker, text) {
				google.maps.event.addListener(marker, 'click', function() {
					stepDisplay.setContent(text);
					stepDisplay.open(map, marker);
				});
			}
			